﻿using MiniFox.Components;
using MiniFox.Platform.Applications.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MiniFox.Platform.Applications
{
    /// <summary>
    /// 
    /// </summary>
    [AutoRegister, SpareComponent(typeof(PlatformService))]
    public interface IPlatformService
    {

        /// <summary>
        /// 
        /// </summary>
        SystemGlobalConfig GetSystemGlobalConfig();
        /// <summary>
        /// 
        /// </summary>
        /// <param name="moduleId"></param>
        /// <returns></returns>
        SystemNavModuleEntry GetSystemModule(string moduleId);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="fullUrl"></param>
        /// <returns></returns>
        SystemNavModuleEntry GetSystemModule(Uri fullUrl);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="module"></param>
        /// <returns></returns>
        string[] GetRoles(SystemNavModuleEntry module); 
        /// <summary>
        /// 
        /// </summary>
        /// <param name="fullUrl"></param>
        /// <returns></returns>
        string[] GetRoles(string fullUrl);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="fullUrl"></param>
        /// <param name="entryUrl"></param>
        /// <returns></returns>
        string[] GetRoles(string fullUrl, string entryUrl);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="identity"></param>
        /// <returns></returns>
        IEnumerable<SystemRole> GetUserRoles(SystemIdentity identity);

        /// <summary>
        /// 
        /// </summary>
        IEnumerable<SystemNavModuleEntry> SystemModules { get; }
    }
}
